/*
 * @Author: szx
 * @Date: 2023-03-31 14:14:56
 * @LastEditTime: 2023-03-31 15:14:02
 * @Description:
 * @FilePath: \learn\fullstackopen\bloglist-part5\src\components\Notification.jsx
 */
/*
 * @Author: szx
 * @Date: 2023-03-28 16:59:22
 * @LastEditTime: 2023-03-28 17:13:09
 * @Description:
 * @FilePath: \learn\fullstackopen\part1\part1\src\components\Notification.jsx
 */
const Notification = ({ notification }) => {
    if (notification === null) return null;
    return <div className="notification">{notification}</div>;
};

const ErrorMessage = ({ error }) => {
    if (error === null) return null;
    return <div className="error">{error}</div>;
};
export { ErrorMessage, Notification };
